import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'kb_bytedance_attribution_method_channel.dart';

abstract class KbBytedanceAttributionPlatform extends PlatformInterface {
  /// Constructs a KbBytedanceAttributionPlatform.
  KbBytedanceAttributionPlatform() : super(token: _token);

  static final Object _token = Object();

  static KbBytedanceAttributionPlatform _instance =
      MethodChannelKbBytedanceAttribution();

  /// The default instance of [KbBytedanceAttributionPlatform] to use.
  ///
  /// Defaults to [MethodChannelKbBytedanceAttribution].
  static KbBytedanceAttributionPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [KbBytedanceAttributionPlatform] when
  /// they register themselves.
  static set instance(KbBytedanceAttributionPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<void> convertInit() {
    throw UnimplementedError('convertInit() has not been implemented.');
  }

  Future<void> sendLaunchEvent() {
    throw UnimplementedError('sendLaunchEvent() has not been implemented.');
  }

  Future<void> onEventV3(
      {required String eventName, required Map<String, dynamic> extraParams}) {
    throw UnimplementedError('onEventV3() has not been implemented.');
  }

  Future<void> onEventRegister(
      {required String registerMethod, required bool isSuccess}) {
    throw UnimplementedError('onEventRegister() has not been implemented.');
  }

  Future<void> onEventPurchase({
    required String contentType,
    required String contentName,
    required String contentId,
    required int contentNumber,
    required String paymentChannel,
    required String currency,
    required bool isSuccess,
    required int currencyAmount,
  }) {
    throw UnimplementedError('onEventPurchase() has not been implemented.');
  }

  ///===============iOS方法
  Future<void> iOSRegisterWithOptionalData({
    String? userUniqueId,
  }) {
    throw UnimplementedError(
        'iOSRegisterWithOptionalData() has not been implemented.');
  }

  Future<void> iOSEventRegister({
    Map<String, dynamic>? params,
  }) {
    throw UnimplementedError('iOSEventRegister() has not been implemented.');
  }

  Future<void> iOSEventStayTime({
    Map<String, dynamic>? params,
  }) {
    throw UnimplementedError('iOSEventStayTime() has not been implemented.');
  }

  Future<void> iOSEventPurchase({
    Map<String, dynamic>? params,
  }) {
    throw UnimplementedError('iOSEventPurchase() has not been implemented.');
  }

  Future<void> iOSEventGameAddiction({
    Map<String, dynamic>? params,
  }) {
    throw UnimplementedError(
        'iOSEventGameAddiction() has not been implemented.');
  }

  Future<void> iOSEventCustom({
    required String eventName,
    Map<String, dynamic>? params,
  }) {
    throw UnimplementedError(
        'iOSRegisterWithOptionalData() has not been implemented.');
  }

  Future<void> iOSEnableIdfa({
    required bool enable,
  }) {
    throw UnimplementedError('iOSEnableIdfa() has not been implemented.');
  }

  Future<String?> iOSGetClickId() {
    throw UnimplementedError('iOSGetClickId() has not been implemented.');
  }
}
